package com.danceforyou.user.vo;

import com.danceforyou.user.model.RoleDO;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.beans.BeanUtils;

import java.util.List;

/**
 * 类名称：RoleVO
 * 创建人：danceforyou
 * 创建时间：2021年01月10日
 * 版本号：1.0v
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class RoleVO extends RoleDO {
    /*树展示信息*/
    private String text;
    /*所属部门*/
    private Long department;
    /*岗位类型*/
    private String roleType;
    /*是否为专员*/
    private Boolean isCommissioner;
    /*子岗位*/
    private List<RoleVO> children;

    public RoleVO() {
    }

    public RoleVO(RoleDO role) {
        BeanUtils.copyProperties(role, this);
        this.text = role.getName();
    }
}